package com.ykdl.member.kid.beans;

import java.io.Serializable;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import net.wxxr.http.interfaces.IJsonParser;

public class MessageBean implements Serializable,IJsonParser{

	/**
	 * 
	 */
	private static final long serialVersionUID = -7308799519271492217L;
	private int dialogue_id ;
	private String last_updated_time ;
	private int new_message_count ;
	private UserActorBean owner_actor ;
	private UserActorBean target_actor ;
	private PmBean last_message ;
	private int actor_dialogue_id ;
	public int getActor_dialogue_id() {
		return actor_dialogue_id;
	}
	public void setActor_dialogue_id(int actor_dialogue_id) {
		this.actor_dialogue_id = actor_dialogue_id;
	}
	public PmBean getLast_message() {
		return last_message;
	}
	public void setLast_message(PmBean last_message) {
		this.last_message = last_message;
	}
	public int getDialogue_id() {
		return dialogue_id;
	}
	public void setDialogue_id(int dialogue_id) {
		this.dialogue_id = dialogue_id;
	}
	public String getLast_updated_time() {
		return last_updated_time;
	}
	public void setLast_updated_time(String last_updated_time) {
		this.last_updated_time = last_updated_time;
	}
	public int getNew_message_count() {
		return new_message_count;
	}
	public void setNew_message_count(int new_message_count) {
		this.new_message_count = new_message_count;
	}
	public UserActorBean getOwner_actor() {
		return owner_actor;
	}
	public void setOwner_actor(UserActorBean owner_actor) {
		this.owner_actor = owner_actor;
	}
	public UserActorBean getTarget_actor() {
		return target_actor;
	}
	public void setTarget_actor(UserActorBean target_actor) {
		this.target_actor = target_actor;
	}
	@Override
	public IJsonParser parse(String json) throws Exception {
		// TODO Auto-generated method stub
		Gson   gson = null;
		if(null != json){
			GsonBuilder b = new GsonBuilder();
			gson  = b.create();
			return gson.fromJson(json, MessageBean.class);
		}
		return null;
	}

}
